import { request } from '@umijs/max'
import { SocialUserTag, SocialUserTagUpdateDTO } from 'types/tag'

export const getSocialUserTagList = async () => {
  return request<SocialUserTag[]>(`/api/social/tag/list`)
}

export const updateSocialUserTag = async (data: SocialUserTagUpdateDTO) => {
  return request<SocialUserTag>(`/api/social/tag/edit`, { method: 'POST', data })
}

export const removeSocialUserTag = async (id: string) => {
  return request<SocialUserTag>(`/api/social/tag/remove?tagId=${id}`, { method: 'POST' })
}
